Github Actions 自动化打包流程

您所在的位置:网站首页 github actions 腾讯云 Github Actions 自动化打包流程

Github Actions 自动化打包流程

2023-08-24 14:55| 来源: 网络整理| 查看: 265

Github Actions 监听仓库 commit 事件,然后执行自动化打包流程,并通过第三方平台自动部署,发布非常方便。

name: Build on: push: branches: - main jobs: build: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Install dependencies run: npm install - name: Build run: npm run build - name: Commit changes run: | git config --global user.email "youremail" git config --global user.name "username" git add . git commit -m "Action bot commit" - name: Push changes uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: main

程序会自动获取 github token,只需要在仓库设置 /settings/actions 中把 Workflow permissions 设为读写权限。



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3